{{ define "admin/giftEdit" }}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"/>
    <!-- Bootstrap core CSS -->
    <link href="/public/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Optional Bootstrap Theme -->
    <link href="data:text/css;charset=utf-8," data-href="/public/dist/css/bootstrap-theme.min.css" rel="stylesheet"
          id="bs-theme-stylesheet">
    <title>{{.Title}} - Go抽奖系统</title>
    <style type="text/css">
        footer {
            border-top: 5px solid seagreen;
            border-bottom: 1px solid #333333;
            /*background-color: #00AA88;*/
            background-color: hsl(209, 51%, 92%);
        }
        .table {
            height: 503px;
        }

        .navbar-brand:hover {
            background-color: #00ccff;
            font-size: 20px;
        }

        .navbar-nav li:hover {
            background-color: #00ccff;
            font-size: 20px;
        }

        body {
            font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
            font-size: 14px;
            line-height: 1.42857143;
            color: #333;
            background-color: #FFE;
        }
    </style>
</head>

<body>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/admin/">抽奖后台</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li {{if eq .Channel "gift"}}class="active"{{end}}><a href="/admin/gift/">奖品管理</a></li>
                <li {{if eq .Channel "code"}}class="active"{{end}}><a href="/admin/code/">优惠券管理</a></li>
                <li {{if eq .Channel "result"}}class="active"{{end}}><a href="/admin/result/">中奖记录数据</a></li>
                <li {{if eq .Channel "user"}}class="active"{{end}}><a href="/admin/user/">用户管理 <span
                                class="sr-only">(current)</span></a></li>
                <li {{if eq .Channel "blackip"}}class="active"{{end}}><a href="/admin/blackip/">IP黑名单</a></li>
            </ul>
            {{/*<form class="navbar-form navbar-left">*/}}
            {{/*<div class="form-group">*/}}
            {{/*<input type="text" class="form-control" placeholder="Search">*/}}
            {{/*</div>*/}}
            {{/*<button type="submit" class="btn btn-default">Submit</button>*/}}
            {{/*</form>*/}}
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false">更多 <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#">Action</a></li>
                        <li><a href="#">Another action</a></li>
                        <li><a href="#">Something else here</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">Separated link</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
<div>
    <!-- Render the current template here -->
    <div class="container-fluid">
        <div class="panel panel-default" style="margin-bottom: 0px;">
            <div class="panel-heading" style="margin-bottom:12px;">
                <a href="/admin/gift">返回</a>
                {{if gt .info.Id 0}}编辑{{else}}添加{{end}}奖品信息
            </div>
            <form class="form-horizontal" action="/admin/gift/save" method="post">
                <div class="form-group" style="height:30px;">
                    <label for="input_title" class="col-sm-2 control-label">奖品名称</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" id="input_title" name="title"
                               value="{{.info.Title}}">
                    </div>
                </div>
                <div class="form-group" style="height:30px;">
                    <label for="input_prize_num" class="col-sm-2 control-label">奖品数</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" id="input_prize_num" name="prize_num"
                               value="{{.info.PrizeNum}}">
                    </div>
                </div>
                <div class="form-group" style="height:30px;">
                    <label for="input_prize_code" class="col-sm-2 control-label"
                           title="0-9999，左右全包含关系，最小概率是万分之一，如：0-0。最大是百分之百，如:0-9999">中奖概率(?)</label>
                    <div class="col-sm-9">
                        <input placeholder="数字区间，如：0-9999" type="text" class="form-control" id="input_prize_code"
                               name="prize_code" value="{{.info.PrizeCode}}">
                    </div>
                </div>
                <div class="form-group" style="height:30px;">
                    <label for="input_prize_time" class="col-sm-2 control-label">中奖周期（D天）</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" id="input_prize_time" name="prize_time"
                               value="{{.info.PrizeTime}}">
                    </div>
                </div>
                <div class="form-group" style="height:30px;">
                    <label for="input_img" class="col-sm-2 control-label">奖品图片</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" id="input_img" name="img" value="{{.info.Img}}">
                    </div>
                </div>
                <div class="form-group" style="height:30px;">
                    <label for="input_displayorder" class="col-sm-2 control-label">位置排序</label>
                    <div class="col-sm-9">
                        <input placeholder="数字0-9" type="text" class="form-control" id="input_displayorder"
                               name="displayorder" value="{{.info.Displayorder}}">
                    </div>
                </div>
                <div class="form-group" style="height:30px;">
                    <label for="input_gtype" class="col-sm-2 control-label" title="0 虚拟，1 相同券，2 不同券，3 实物小奖，4 实物大奖">类型(?)</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" id="input_gtype" name="gtype"
                               value="{{.info.Gtype}}">
                    </div>
                </div>
                <div class="form-group" style="height:30px;">
                    <label for="input_gdata" class="col-sm-2 control-label">扩展数据</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" id="input_gdata" name="gdata"
                               value="{{.info.Gdata}}">
                    </div>
                </div>
                <div class="form-group" style="height:30px;">
                    <label for="input_time_begin" class="col-sm-2 control-label">开始时间</label>
                    <div class="col-sm-9">
                        <input placeholder="格式：YYYY-MM-DD hh:mm:ss" type="text" class="form-control"
                               id="input_time_begin" name="time_begin" value="{{.info.TimeBegin}}">
                    </div>
                </div>
                <div class="form-group" style="height:30px;">
                    <label for="input_time_end" class="col-sm-2 control-label">结束时间</label>
                    <div class="col-sm-9">
                        <input placeholder="格式：YYYY-MM-DD hh:mm:ss" type="text" class="form-control"
                               id="input_time_end" name="time_end" value="{{.info.TimeEnd}}">
                    </div>
                </div>

                <div class="form-group" style="height:30px;">
                    <div class="col-sm-offset-2 col-sm-9">
                        <button type="submit" class="btn btn-default">保存</button>
                        <input type="reset" class="btn btn-default" value="重置"/>
                        <input type="hidden" class="form-control" id="input_id" name="id" value="{{.info.Id}}">
                    </div>
                </div>
            </form>
        </div>
    </div>
    <hr/>
    <footer style="text-align: center;">
        <center>
            <table  width="640" border="0">
                <tr class="tt">
                    <td align="center" width="80"><a href="#"><font size="1"><b>关于我们&nbsp;&nbsp;&nbsp;&nbsp;|</b></font></a></td>
                    <td align="center" width="80"><a href="#"><font size="1"><b>About&nbsp;&nbsp;&nbsp;&nbsp;|</b></font></a></td>
                    <td align="center" width="80"><a href="#"><font size="1"><b>服务协议&nbsp;&nbsp;&nbsp;&nbsp;|</b></font></a></td>
                    <td align="center" width="80"><a href="#"><font size="1"><b>隐私政策 &nbsp;&nbsp;&nbsp;&nbsp;|</b></font></a></td>
                    <td align="center" width="80"><a href="#"><font size="1"><b>开放平台&nbsp;&nbsp;&nbsp;&nbsp;|</b></font></a></td>
                    <td align="center" width="80"><a href="#"><font size="1"><b>商务洽谈&nbsp;&nbsp;&nbsp;&nbsp;|</b></font></a></td>
                    <td align="center" width="80"><a href="#"><font size="1"><b>招聘&nbsp;&nbsp;&nbsp;&nbsp;|</b></font></a></td>
                    <td align="center" width="80"><a href="#"><font size="1"><b>客服中心&nbsp;&nbsp;&nbsp;&nbsp;</b></font></a></td>
                </tr>
            </table>
            <p><font size="1"><b>&copy;2022 - Go抽奖系统：&copy;:版权所有，计科三班，黄栋林</b></font></p>
            <address>E-mail:  huangdonglin@qq.com</address>
        </center>
    </footer>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/public/dist/jquery/1.12.4/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/public/dist/js/vendor/jquery.min.js"><\/script>')</script>
<script src="/public/dist/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
{{ end }}